<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>优家购房系统 - 后勤人员信息更新</title>
	<script type="text/javascript" src="My97DatePicker/WdatePicker.js"></script>
	<script type="text/javascript" src="js/jquery-3.3.1.js"></script>
	<link rel="stylesheet" href="css/main.css">
	<link rel="stylesheet" href="lib/font-awesome/css/font-awesome.css">
	
<script type="text/javascript">
	//根据传入的值默认选中option
	$(document).ready(function(){
		var sex = '${logistics.lo_sex }';
		var status = '${logistics.lo_status }';
		$("#test option").each(function(){
			//alert($(this).val());
			if($(this).val()==sex){
				$(this).attr("selected",true);
			}
		});
		$("#test2 option").each(function(){
			//alert($(this).val());
			if($(this).val()==status){
				$(this).attr("selected",true);
			}
		});
	});
</script>

</head>
<body style="background:url('image/bg3.jpg');background-size:cover;">
<div class="box">
	<h3>更新后勤人员信息</h3>
	<form action="LogisticsServlet2?method=update" method="post">
		<input type="hidden" name="id" value="${logistics.lo_id }">
		<table class="form-table">
			<tr>
			<td>姓名</td>
			<td colspan="3" class="control">
				<input type="text" name="name" value="${logistics.lo_name }">
			</td>
		</tr>
		<tr>
			<td>性别</td>
			<td colspan="3" class="control">
				<select name="sex" id="test">
					<option value="0">女</option>
					<option value="1">男</option>
				</select>
			</td>
		</tr>
		<tr>
			<td>身份证号</td>
			<td colspan="3" class="control">
				<input type="text" name="idCard" value="${logistics.lo_id_card }">
			</td>
		</tr>
		<tr>
			<td>籍贯</td>
			<td colspan="3" class="control">
				<input type="text" name="nativePlace" value="${logistics.lo_native_place }">
			</td>
		</tr>
		<tr>
			<td>手机号</td>
			<td colspan="3" class="control">
				<input type="text" name="phone" value="${logistics.lo_phone }">
			</td>
		</tr>
		<tr>
			<td>部门岗位</td>
			<td colspan="3" class="control">
				<input type="text" name="post" value="${logistics.lo_post }">
			</td>
		</tr>
		<tr>
			<td>工资</td>
			<td colspan="3" class="control">
				<input type="text" name="sal" value="${logistics.lo_sal }">
			</td>
		</tr>
		<tr>
			<td>添加时间</td>
			<td colspan="3" class="control">
				<input type="text" name="createTime" value="${logistics.lo_create_time }" class="Wdate" onClick="WdatePicker()">
			</td>
		</tr>
		<tr>
			<td>信息状态</td>
			<td colspan="3" class="control">
				<select name="status" id="test2">
					<option value="0">已失效</option>
					<option value="1">正常</option>
				</select>
			</td>
		</tr>
		</table>
		<div class="buttons">
			<input class="btn btn-primary va-bottom" type="submit" value="保存">&nbsp;&nbsp;
			<a class="btn btn-default" href="javascript:history.go(-1)">返回</a>
		</div>
	</form>
</div>
</body>
</html>